package com.yylc.cscore.dao;

import com.yylc.cscore.entity.TaskRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author xiangnan
 * date 2018/5/10
 */
@Mapper
public interface TaskRelationDao {

    /**
     * 获取所有的userId
     */
    Set<String> selectAllUserId();

    List<TaskRelationEntity> selectByServiceId(@Param("serviceId") String serviceId);

    TaskRelationEntity selectByUserId(@Param("userId") String userId);

    int insert(TaskRelationEntity entity);

    int updateById(TaskRelationEntity entity);

    /**
     * 获取所有未外呼的任务
     */
    List<TaskRelationEntity> selectWhList(@Param("whLabel") String whLabel);

    int deleteByIdAndWhLabel(TaskRelationEntity entity);

}
